<?php $this->load->view('common/ck-bosspagehead'); ?>
<?php $this->load->view('common/ck-bossheader'); ?>
<article id="content">
    <div class="pgwrapper">
    <div class="w960 bg1 p15 bx_shw">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="20%" style="border-right: 2px solid #e5e5e5;" valign="top">
			<?php $this->load->view('enterprises/leftnavCMS'); ?>
			</td>
			<td width="80%" valign="top"><form name="popOffer" enctype="multipart/form-data"
					action="/updatePopupOffer" onsubmit="return validateForm()" method="POST">
					<table width="100%" border="0" cellpadding="5" cellspacing="0"
						style="padding-left: 20px;">
						<input type="hidden" name="offer_id" id="offer_id" value="<?php echo $offerArray[0]['offer_id'];?>" />
						<input type="hidden" name="offer_old_img" id="offer_old_img" value="<?php echo $offerArray[0]['offer_image'];?>" />
						<tr>
							<td class="txt-blck" width="30%">Offer Title:</td>
							<td width="70%"><input type="text" value="<?php echo $offerArray[0]['offer_title'];?>" name="offer_title"
								id="offer_title" class="inputCMS" style="width: 300px;" maxlength="60"/>
								<span style="font-size:12px;color:red;">Title can be upto 60 Chars..</span>
							</td>
						</tr>
						<tr>
							<td class="txt-blck">Offer Image</td>
							<td><input type="file" id="offer_image" name="offer_image" /></td>
						</tr>
						<tr>
							<td class="txt-blck" width="30%">Offer Image Url:</td>
							<td width="70%"><input type="text" value="<?php echo $offerArray[0]['offer_url'];?>" name="offer_url"
								id="offer_url" class="inputCMS" style="width: 300px;"/>
							</td>
						</tr>
						<tr>
							<td class="txt-blck" width="30%">Offer Image Alt:</td>
							<td width="70%"><input type="text" value="<?php echo $offerArray[0]['offer_alt'];?>" name="offer_alt"
								id="offer_alt" class="inputCMS" style="width: 300px;"/>
							</td>
						</tr>
						<tr>
							<td class="txt-blck">Offer Status:</td>
							<td><select id="offer_status" name="offer_status">
									<option value="Yes"
									<?php if($offerArray[0]['offer_status']=='Yes'){ echo 'Selected';}?>>Yes</option>
									<option value="No"
									<?php if($offerArray[0]['offer_status']=='No'){ echo 'Selected';}?>>No</option>
							</select></td>
						</tr>
						<tr>
							<td></td>
							<td><input type="submit" name="deal_submit" value="Submit" /></td>
						</tr>
					</table>
				</form></td>
		</tr>
	</table>
</div>
</div>
</article>
<div class="clr-both spacer-10">&nbsp;</div>
<?php $this->load->view('common/ck-bossfooter'); ?>
<script>
function validateForm(){
	if(document.popOffer.offer_title.value=='')
	 {
	 alert("Title can not be blank"); 
	 document.popOffer.offer_title.focus();
	 return false;
	 }
}
</script>